package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.constant.CommonConstant
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@Table(name = "base_administrative_duty")
@TableName("base_administrative_duty")
@ApiModel(value = "职务")
data class Duty(

        @ApiModelProperty("职务名称")
        var dutyName: String? = null,

        @ApiModelProperty("区域id")
        var areaId: String? = null,

        @ApiModelProperty("备注")
        var description: String? = null,

        @ApiModelProperty("类型 0.政府 1.监管部门")
        var type: Int? = null,

        @ApiModelProperty(value = "是否启用 0启用 -1禁用")
        var status:Int = CommonConstant.STATUS_NORMAL

) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object {
        private const val serialVersionUID = 1L
    }
}